home *** CD-ROM | disk | FTP | other *** search
- RESHAPE(3I) Last changed: 4-13-99
-
-
- NNAAMMEE
- RREESSHHAAPPEE - Constructs an array of a specified shape
-
- SSYYNNOOPPSSIISS
- RREESSHHAAPPEE (([SSOOUURRCCEE==]_s_o_u_r_c_e,, [SSHHAAPPEE==]_s_h_a_p_e [,,[PPAADD==]_p_a_d] [,,[OORRDDEERR==]_o_r_d_e_r]))
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- UNICOS, UNICOS/mk, IRIX systems
-
- CF90, MIPSpro 7 Fortran 90
-
- SSTTAANNDDAARRDDSS
- Fortran
-
- DDEESSCCRRIIPPTTIIOONN
- The RREESSHHAAPPEE intrinsic function constructs an array of a specified
- shape from the elements of a given array. It accepts the following
- arguments:
-
- _s_o_u_r_c_e May be of any type. It must be array valued. If _p_a_d is
- absent or of size zero, the size of _s_o_u_r_c_e must be greater
- than or equal to PPRROODDUUCCTT(_s_h_a_p_e). The size of the result is
- the product of the values of the elements of _s_h_a_p_e.
-
- _s_h_a_p_e Must be an integer, of rank one, and of constant size. Its
- size must be positive and less than 8. It must not have an
- element whose value is negative.
-
- _p_a_d Must be of the same type as _s_o_u_r_c_e. It must be array
- valued.
-
- _o_r_d_e_r Must be of type integer. It must have the same shape as
- _s_h_a_p_e, and its value must be a permutation of (1,2,...,_n),
- where _n is the size of _s_h_a_p_e. If absent, the default order
- is (1,2,...,_n).
-
- RREESSHHAAPPEE is a transformational function. The name of this intrinsic
- cannot be passed as an argument.
-
- RREETTUURRNN VVAALLUUEESS
- The type of the result is the same type as _s_o_u_r_c_e. The result is an
- array of shape _s_h_a_p_e, that is, SSHHAAPPEE((RREESSHHAAPPEE((_s_o_u_r_c_e,,_s_h_a_p_e,,_p_a_d,,_o_r_d_e_r))))
- is equal to _s_h_a_p_e.
-
- The elements of the result, taken in permuted subscript order
- _o_r_d_e_r(1), ..., _o_r_d_e_r(_n), are those of _s_o_u_r_c_e in normal array element
- order followed, if necessary, by those of _p_a_d in array element order,
- followed, if necessary, by additional copies of _p_a_d in array element
- order.
-
- EEXXAAMMPPLLEESS
- Example 1: RREESSHHAAPPEE((((//11,,22,,33,,44,,55,,66//)),, ((//22,,33//)))) has the following value:
-
- | 1 3 5 |
-
- | 2 4 6 |
-
- Example 2: RREESSHHAAPPEE((((//11,,22,,33,,44,,55,,66,,77,,88,,99//)),, ((//33,,44//)),, ((//00,,00//)))) has the
- following value:
-
- | 1 4 7 0 |
-
- | 2 5 8 0 |
-
- | 3 6 9 0 |
-
- Example 3: RREESSHHAAPPEE((((//11,,22,,33,,44,,55,,66//)),, ((//22,,44//)),, ((//00,,00//)),, ((//22,,11//)))) has
- the following value:
-
- | 1 2 3 4 |
-
- | 5 6 0 0 |
-
- SSEEEE AALLSSOO
- _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l for the printed version of this
- man page.
-